//
//  SQMySQL.h
//  pai
//
//  Created by pro on 14-12-10.
//  Copyright (c) 2014年 linjunjing. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <sqlite3.h>

#define SQLFilename  @"notice.db"
@class sqlTestList;

@interface SQMySQL : NSObject
{
    sqlite3 *_database;
}

@property (nonatomic) sqlite3 *_database;
-(BOOL) createTestList:(sqlite3 *)db;//创建数据库
-(BOOL) insertTestList:(sqlTestList *)insertList;//插入数据
-(BOOL) updateTestList:(sqlTestList *)updateList;//更新数据
-(NSMutableArray*)getTestList:(sqlTestList *)insertList;//获取全部数据
- (BOOL) deleteTestList:(sqlTestList *)deletList;//删除数据：
- (NSMutableArray*)searchTestList:(NSString*)searchString;//查询数据库，searchID为要查询数据的ID，返回数据为查询到的数据
@end

@interface sqlTestList : NSObject//重新定义了一个类，专门用于存储数据
{
    int noticeID;
    int noticeType;
    NSString *username;
    NSString *noticeTitle;
    NSString *noticeContent;
}

@property (nonatomic) int noticeID;
@property (nonatomic) int noticeType;
@property (nonatomic, retain) NSString *username;
@property (nonatomic, retain) NSString *noticeTitle;
@property (nonatomic, retain) NSString *noticeContent;

@end
